Ext.define('jwawa.erp.cfg.entity.EntityHeaderModel', {
    extend: 'jwawa.erp.framework.JwawaModel',
    constructor: function(config){
        var me = this;

        Ext.apply(me, config);
        me.callParent(arguments);
    },

    findAllEntities: function(opt){
        "use strict";
        var me = this,
            optional = me.buildOpt(opt);

        Jwawa.framework.JwawaConnection.request({
            url      : '/entity/find-all-entities',
            async    : false,
            success : function(response) {
                var entities = response['data'];
                optional['success'](entities, response);
            }
        });
    }
});